package com.ssyan.boot.bean;

import lombok.*;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 只有在容器中的组件，才会拥有SpringBoot提供的强大功能
 * 方式一：@Component+@ConfigurationProperties(prefix = "配置文件响应前缀")
 * 方式二：配置类添加@EnableConfigurationProperties(该类.class)+本类添加@ConfigurationProperties
 */
//@Component
@ConfigurationProperties(prefix = "mycar")
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode
public class Car {

    private String brand;
    private Integer price;


}
